package com.itheima.pool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Demo02 {

    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(10);
        //初始长度 0
        for (int i=0;i<100;i++) {
            pool.submit(()->{
                String name = Thread.currentThread().getName();
                System.out.println(name+"正在执行");
            });
        }
        pool.shutdown();

    }
}
